
//登录方法
function login(){

    let name = $('#username').val();
    let password = $('#password').val();

    $.ajax({

        url:"/webapi/login/user",
        data:{
            username:name,
            password:password
        }
    }).done(function (rs){

        if (rs>=0){
            //成功
            window.location.href = "/student/list";
        }
        else {
            alert("出错了，用户名或密码错误!");
        }
    })
}